Skip to content

ci(lint): install rustfmt/clippy via rustup; relax test_version assert - #81

Merged
zackees merged 2 commits into
mainfrom
fix-pr-80-ci
May 13, 2026
Merged

zackees merged 2 commits into
mainfrom
fix-pr-80-ci

Conversation

@zackees

@zackees zackees commented May 13, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to PR #80, which merged with two failing CI checks on main:

  1. Linux ARM Lint — error: 'cargo-fmt' is not installed for the toolchain 'stable-aarch64-unknown-linux-gnu'
  2. Linux ARM Unit Test — AssertionError: 'fastled 2.0.7' != '2.0.7'

Root causes

Failure 1 — missing rustfmt/clippy components

zackees/setup-soldr@v0 reads channel from rust-toolchain.toml but ignores the components array. The action provisions stable with profile: minimal and no components, so cargo fmt / cargo clippy fail.

The pinned channel 1.94.1 from rust-toolchain.toml was also dropped — setup-soldr resolves to stable regardless. That's a separate issue worth filing with setup-soldr; for now provision the components explicitly.

Soldr's own CLI does not yet expose component management (its subcommands are cargo, rustc, rustfmt, clippy-driver, …, which all assume the component is already installed). The pragmatic fix is to call rustup component add after setup-soldr provisioned rustup.

Failure 2 — version-string format change

fastled --version previously went through Python argparse and emitted the bare version string 2.0.7. With the migration to the Rust CLI (clap), the output became fastled 2.0.7 — clap's standard <bin> <version> format. The test still used assertEqual. Relaxed to assertIn, which verifies the package version is present without prescribing the exact format.

Files

  • .github/workflows/_lint.yml — add rustup component add rustfmt clippy step after setup-soldr.
  • tests/unit/test_version.py — switch assertEqual → assertIn.

Test plan

  • bash lint — green locally
  • uv run pytest tests/unit/test_version.py -v — passes
  • CI re-runs the previously failing Linux ARM Lint and Linux ARM Unit Test jobs — should pass

Related

🤖 Generated with Claude Code

zackees and others added 2 commits May 13, 2026 15:36
Soldr (via zccache) is the project's compile cache. The sccache
fallback in ci/env.py::_apply_rustc_wrapper was carried forward
from the pre-soldr era; with PR #79 (closing #75) it no longer
serves a purpose. Remove the fallback so RUSTC_WRAPPER points
only at zccache when set.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes the two CI regressions that PR #80 surfaced on main:

1. **Lint job missing rustfmt and clippy.**
   zackees/setup-soldr@v0 reads only the channel from rust-toolchain.toml;
   the components array (["clippy", "rustfmt"]) is ignored. With the
   minimal profile, cargo fmt fails:
       error: 'cargo-fmt' is not installed for the toolchain
   Provision them explicitly via rustup component add after setup-soldr.
   Soldr itself does not yet expose component management — its CLI runs
   tools from the active toolchain but doesn't install missing components.

2. **test_version.py expects bare version string.**
   The Rust CLI (clap) emits 'fastled 2.0.7' for --version, matching the
   standard '<bin> <version>' format. The Python-era argparse emitted just
   '2.0.7'. Switch from assertEqual to assertIn so the package version is
   verified to be present without prescribing the exact format.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zackees
zackees merged commit caf10e1 into main May 13, 2026
20 of 25 checks passed
@zackees
zackees deleted the fix-pr-80-ci branch November 5, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant